package com.zhonghan.recharge.service.impl;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageInfo;
import com.zhonghan.common.bean.Result;
import com.zhonghan.common.enums.ResultStatus;
import com.zhonghan.recharge.dao.ZhBusinessUserDao;
import com.zhonghan.recharge.pojo.ZhBusinessRecord;
import com.zhonghan.recharge.pojo.ZhBusinessUser;
import com.zhonghan.recharge.pojo.ZhFillCard;
import com.zhonghan.recharge.service.ZhBusinessUserService;
@Service
public class ZhBusinessUserServiceImpl implements ZhBusinessUserService{
    @Autowired
    private ZhBusinessUserDao zhBusinessUserDao;
    @Override
    public long getZhBusinessUserRowCount(){
        return zhBusinessUserDao.getZhBusinessUserRowCount();
    }
    @Override
    public List<ZhBusinessUser> selectZhBusinessUser(){
        return zhBusinessUserDao.selectZhBusinessUser();
    }
    @Override
    public List<ZhBusinessUser> selectZhBusinessUserByObj(ZhBusinessUser obj){
        return zhBusinessUserDao.selectZhBusinessUserByObj(obj);
    }
    @Override
    public ZhBusinessUser selectZhBusinessUserById(Long id){
        return zhBusinessUserDao.selectZhBusinessUserById(id);
    }
    @Override
    public int insertZhBusinessUser(ZhBusinessUser value){
        return zhBusinessUserDao.insertZhBusinessUser(value);
    }
    @Override
    public int insertNonEmptyZhBusinessUser(ZhBusinessUser value){
        return zhBusinessUserDao.insertNonEmptyZhBusinessUser(value);
    }
    @Override
    public int insertZhBusinessUserByBatch(List<ZhBusinessUser> value){
        return zhBusinessUserDao.insertZhBusinessUserByBatch(value);
    }
    @Override
    public int deleteZhBusinessUserById(Long id){
        return zhBusinessUserDao.deleteZhBusinessUserById(id);
    }
    @Override
    public int updateZhBusinessUserById(ZhBusinessUser enti){
        return zhBusinessUserDao.updateZhBusinessUserById(enti);
    }
    @Override
    public int updateNonEmptyZhBusinessUserById(ZhBusinessUser enti){
        return zhBusinessUserDao.updateNonEmptyZhBusinessUserById(enti);
    }

    public ZhBusinessUserDao getZhBusinessUserDao() {
        return this.zhBusinessUserDao;
    }

    public void setZhBusinessUserDao(ZhBusinessUserDao zhBusinessUserDao) {
        this.zhBusinessUserDao = zhBusinessUserDao;
    }
    
    
    public int updateZhBusinessUserByTotalAssets(Long totalAssets,String phone){
    	return zhBusinessUserDao.updateZhBusinessUserByTotalAssets(totalAssets, phone);
    }
    
    @Override
    public ZhBusinessUser selectZhBusinessUserByPhone(String phone){
        return zhBusinessUserDao.selectZhBusinessUserByPhone(phone);
    }
    /**
     * 修改大客户端口信息
     * @param id
     * @param portToken
     * @param portAppkey
     * @param portAppsecret
     * @param portUrl
     * @param portPhone
     * @return
     */
    public int updateBusinessUserByPort(Long id,String portToken,String portAppkey,
			String portAppsecret,String portUrl,String portPhone){
    	return zhBusinessUserDao.updateBusinessUserByPort(id, portToken, portAppkey, portAppsecret, portUrl, portPhone);
    }
}